
import 'package:creatures_world/pages/favor/favor_controller.dart';
import 'package:creatures_world/pages/favor/favor_page.dart';
import 'package:creatures_world/pages/func/func_controller.dart';
import 'package:creatures_world/pages/func/func_page.dart';
import 'package:creatures_world/pages/home/home_controller.dart';
import 'package:creatures_world/pages/home/home_page.dart';
import 'package:get/get.dart';
import 'package:get/get_core/src/get_main.dart';
import 'package:get/get_instance/src/bindings_interface.dart';
import 'package:get/get_navigation/src/routes/get_route.dart';
import 'package:get/get_navigation/src/routes/transitions_type.dart';

import '../pages/species_detail/species_detail_controller.dart';
import '../pages/species_detail/species_detail_page.dart';

class AppPage {

  static const String ROUTER_ROOT="/";
  static const String ROUTER_SPDETAIL="/sp_detail";
  static const String ROUTER_FUNC="/func";
  static const String ROUTER_FAVOR="/favor";

  static const rout_animate_duration=const Duration(milliseconds:200 );

  static final routes = <GetPage>[

    GetPage(name: AppPage.ROUTER_ROOT, page: () => HomePage(),binding: BindingsBuilder((){
      return Get.lazyPut(() => HomeController());
    }),transition: Transition.rightToLeft,transitionDuration:rout_animate_duration),


    GetPage(name: AppPage.ROUTER_SPDETAIL, page: () => SpeciesDetailPage(),binding: BindingsBuilder((){
      return Get.lazyPut(() => SpeciesDetailController());
    }),transition: Transition.rightToLeft,transitionDuration:rout_animate_duration),


    GetPage(name: AppPage.ROUTER_FUNC, page: () => FuncPage(),binding: BindingsBuilder((){
      return Get.lazyPut(() => FuncController());
    }),transition: Transition.rightToLeft,transitionDuration:rout_animate_duration),


    GetPage(name: AppPage.ROUTER_FAVOR, page: () => FavorPage(),binding: BindingsBuilder((){
      return Get.lazyPut(() => FavorController());
    }),transition: Transition.rightToLeft,transitionDuration:rout_animate_duration),

  ];

}
